<template>
	<view>
		<button @click="goRsd()">刷新</button>
		<view v-for="index in 30">
			<view style=" height:100rpx;background-color:aquamarine;margin: 5rpx;">
				测试数据{{index}}</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		onPullDownRefresh(){
			console.log("onPullDownRefresh 开始刷新");
			setTimeout(()=>{
				console.log("onPullDownRefresh 数据刷新完了");
				uni.stopPullDownRefresh()
				},2000)
				},
				onReachBottom(){
					console.log("onReachBottom");
				},
		methods: {
			goRsd(){
				uni.startPullDownRefresh({
					success() {
						console.log("startPullDownRefresh success");
					},
					fail(){
						console.log("startPullDownRefresh fail");
					},complete(){
						console.log("startPullDownRefresh complete");
					}
				})
			}
			
		}
	}
</script>

<style>

</style>